﻿<Window x:Class="RssReader.Window1"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    Title="Window1" Height="626" Width="632" 
    xmlns:local="clr-namespace:RssReader"    
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008" 
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" 
    mc:Ignorable="d" >
	<Window.Resources>
    <DataTemplate x:Key="RSS"> 
      <StackPanel MaxWidth="200"> 
        <TextBlock Text="{Binding Title}" TextWrapping="Wrap" FontSize="16" FontWeight="Bold"/> 
        <TextBlock Text="{Binding DatePublished}" TextWrapping="Wrap" FontSize="9"/> 
      </StackPanel>      
    </DataTemplate>
    
  </Window.Resources>
	
    <Grid DataContext="{x:Static local:DesignTimeModel.ViewModel}">
    	<Grid.RowDefinitions>
    		<RowDefinition MaxHeight="50"/>
    		<RowDefinition Height="*"/>
    	</Grid.RowDefinitions>
    	<Grid.ColumnDefinitions>
    		<ColumnDefinition MaxWidth="210"/>
    		<ColumnDefinition Width="*"/>
    	</Grid.ColumnDefinitions>    	
    		<!--<ComboBox ItemsSource="{Binding Feeds}" SelectedItem="{Binding SelectedFeed}" DockPanel.Dock="Top" Width="392" HorizontalAlignment="Left" VerticalAlignment="Top"/>--> 
    		<ListBox ItemsSource="{Binding Path=SelectedFeed.Posts}" SelectedItem="{Binding Path=SelectedPost}" Width="200" MinHeight="200" HorizontalAlignment="Left" ItemTemplate="{DynamicResource RSS}" Grid.RowSpan="2"/>
    
    		<WebBrowser 
    			local:WebBrowserExtender.HTML="{Binding Path=SelectedPost.Description}" 
				Grid.RowSpan="2"				 
				RenderTransformOrigin="0.5,0.5" 
				x:Name="webBrowser" Margin="0,0,0,0" 
				Grid.Column="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch"
				d:LayoutOverrides="Width" />

    	</Grid>
 
</Window>
